package com.jctrip.hotel.source.model.greentree.resp;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
import com.jctrip.hotel.source.model.greentree.req.GreenTreeBaseReq;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @Author：Haruhi
 * @description:
 * @Date：2023/8/31 13:57
 * @Package：com.jctrip.hotel.source.model.greentree.req
 * @Project：hotel-main
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@JacksonXmlRootElement(localName = "SearchBooking")
public class SearchBookingResp extends GreenTreeBaseResp {

    @ApiModelProperty(value = "酒店编号")
    @JacksonXmlProperty(isAttribute = true)
    private String hotelCode;

    @ApiModelProperty(value = "中介订单号")
    @JacksonXmlProperty(localName = "AgentUniqueID")
    private String agentUniqueID;

    @JacksonXmlProperty(localName = "ResvInfos")
    private ResvInfos resvInfos;

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Builder
    public static class ResvInfos {

        @JacksonXmlElementWrapper(useWrapping = false)
        @JacksonXmlProperty(localName = "ResvInfo")
        private List<ResvInfo> resvInfoList;

        @Data
        @NoArgsConstructor
        @AllArgsConstructor
        @Builder
        public static class ResvInfo {

            @ApiModelProperty(value = "预定号")
            @JacksonXmlProperty(localName = "UniqueID")
            private String uniqueID;

            @ApiModelProperty(value = "订单创建日期")
            @JacksonXmlProperty(localName = "CreateDate")
            private String createDate;

            @ApiModelProperty(value = "订单取消日期")
            @JacksonXmlProperty(localName = "CancelDate")
            private String cancelDate;

            @ApiModelProperty(value = "姓名")
            @JacksonXmlProperty(localName = "Name")
            private String name;

            @ApiModelProperty(value = "性别")
            @JacksonXmlProperty(localName = "Gender")
            private Integer gender;

            @ApiModelProperty(value = "房间类型")
            @JacksonXmlProperty(localName = "RoomTypeCode")
            private Integer roomTypeCode;

            @ApiModelProperty(value = "房号")
            @JacksonXmlProperty(localName = "RoomNo")
            private Integer roomNo;

            /**
             * 预定状态
             * R(预定),C(取消),NW(NoShow),O(离店),I(入住),QO(欠款离店)
             */
            @ApiModelProperty(value = "预定状态，R(预定),C(取消),NW(NoShow),O(离店),I(入住),QO(欠款离店)")
            @JacksonXmlProperty(localName = "Status")
            private String status;

            @JsonProperty("Tel")
            @JacksonXmlProperty(localName = "Tel")
            private String tel;

            @ApiModelProperty(value = "预计入住日期，2007-8-3 15:01:01")
            @JacksonXmlProperty(localName = "PlanArriveDate")
            private String planArriveDate;

            @ApiModelProperty(value = "预计离店日期，2007-8-3 15:01:01")
            @JacksonXmlProperty(localName = "PlanDepartureDate")
            private String planDepartureDate;

            @ApiModelProperty(value = "入住时间，2007-8-3 15:01:01")
            @JacksonXmlProperty(localName = "CheckInTime")
            private String checkInTime;

            @ApiModelProperty(value = "离开时间，2007-8-3 15:01:01")
            @JacksonXmlProperty(localName = "CheckOutTime")
            private String checkOutTime;
        }
    }

}